//
//  ArticleSecoondViewController.m
//  MyProject
//
//  Created by dllo on 15/10/31.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "ArticleSecoondViewController.h"

@interface ArticleSecoondViewController ()<UIWebViewDelegate>
@property (nonatomic,strong) UIWebView *web ;
@property (nonatomic,strong) UIView *myview;
@end
#define WIDTH ([UIScreen mainScreen].bounds.size.width/375)
#define HEIGH ([UIScreen mainScreen].bounds.size.height/667)
@implementation ArticleSecoondViewController

- (void)viewWillAppear:(BOOL)animated
{
//    self.tabBarController.tabBar.hidden = YES;
//    self.navigationController.navigationBar.hidden = YES;
    
    if (![[NSUserDefaults standardUserDefaults]boolForKey:@"isWhite"]) {
        self.myview = [[UIView alloc]initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 100000)];
        [self.web.scrollView addSubview:_myview];
        _myview.alpha = 0.5;
        _myview.backgroundColor = [UIColor grayColor];
        _myview.userInteractionEnabled = YES;
    }
    else {
        self.myview.hidden = YES;
    }
    
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    NSLog(@"%@",self.use);
    self.web = [[UIWebView alloc]initWithFrame:CGRectMake(0, -64 * HEIGH, 375 * WIDTH, 667 * HEIGH +64 * HEIGH)];
    NSString *str = self.use;
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:str]];
    self.web.scrollView.bounces = NO;
    self.web.exclusiveTouch = NO;
    [self.view addSubview:self.web];
    [self.web loadRequest:request];

    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
